-- dark_ceremony
-- create by dengc
-- 技能: 黑暗仪式，攻击并且让敌人无法恢复生命值及魔法值

return {
    apply = function(source, target, skillId, round, para, extra)
        -- 获取攻击者的攻击力
        local damage = source:queryAttrib("attack");

        -- 叠加倍数
        damage = damage * para[1];

        local propId = para[2];
        local last = para[3];

        -- 附加状态，无法恢复生命及魔法
        local lastRound = round + last;
        arr = ({ propId, 1, 1, lastRound, });

        local condition = {
            ["prop"] = arr,
            ["end_round"] = lastRound,
        };

        -- 附加状态
        CombatStatusM.applyStatus(target, "dark_ceremony", condition);

        -- 造成伤害
        CombatM.receiveDamage(source, target, damage, skillId);

        -- TODO: UI层播特效
    end,

    parse = function(desc)
        local arr = string.explode(desc, ",");
        return { tonumber(arr[1]), tonumber(arr[2]), tonumber(arr[3]), };
    end,

    -- 解析技能描述
    parseDesc = function(source, skillId, desc, para)
        return desc;
    end,
}

